function [Bez_points, num_path, num_segments, delta_t, t, solution1, solution2, solution3, solution4, solution5,...
    Path_bez, ms_i, uav_ws, n_obs, obs, obs_rad] = make_video_5_19a()

%inputs
Bez_points = [5,5;8.63560336409089,10.6872535554619;12.2712067281818,16.3745071109238;12.5923429274339,20.1107313472875;12.9134791266861,23.8469555836512;14.3304811541586,29.9507641591172;15.7474831816310,36.0545727345832;17.7904532373645,40.1717478012203;19.8334232930979,44.2889228678574;22.5915742703316,48.9457659335816;25.3497252475654,53.6026089993059;30.0812813115742,55.3956746345054;34.8128373755829,57.1887402697048;40.6926708506755,61.0949314463295;46.5725043257680,65.0011226229541;50.1925891233372,67.3615936022486;53.8126739209065,69.7220645815430;59.7129429880258,70.0302264259285;65.6132120551451,70.3383882703140;71.6948495600573,70.8835465267818;77.7764870649695,71.4287047832497;84.6331543625164,77.1056374076606;91.4898216600633,82.7825700320715;94.7770737257431,84.5871403013278;98.0643257914230,86.3917105705841;98.3731428336144,91.4404870737321;98.6819598758058,96.4892635768802;100,100];

num_path = 3;
num_segments = 14; %0;
delta_t = 0.1;
t = 0 : delta_t : 1;

solution1 = [5,5;7.01900938077834,8.42391101765031;9.03801876155668,11.8478220353006;12.8127753105548,16.5648864692206;16.5875318595530,21.2819509031407;22.1448745081106,26.0229944092793;12.2712067281818,16.3745071109238;14.7207274868140,19.2199067225405;17.1702482439731,22.0653063331954;22.0807259842557,26.9449379277220;26.9912037230806,31.8245695223405;34.4335575056370,32.6009661122605;12.9134791266861,23.8469555836512;14.3304794073860,29.9507658162308;15.7474796881004,36.0545760488001;17.4436999496451,39.4313566386461;19.1399202111415,42.8081372285097;23.1457774523145,47.6222929028175;15.7474831816310,36.0545727345832;17.4436960116265,39.4313493814280;19.1399088416220,42.8081260282727;22.1766763363102,48.2395302109926;25.2134438309983,53.6709343937125;30.2290003603211,55.5540077358087;19.8334232930979,44.2889228678574;22.5915742703316,48.9457659335816;25.3497252475654,53.6026089993059;30.0264351498214,55.3310357726919;34.7031450520774,57.0594625460779;40.9279650652569,61.3223418582346;25.3497252475654,53.6026089993059;30.0812813115742,55.3956746345054;34.8128373756610,57.1887402698105;40.6926971806999,61.0949360147074;46.5725569855053,65.0011317596078;49.7400282833006,67.1791517777703;34.8128373755829,57.1887402697048;40.6926708506755,61.0949314463295;46.5725043257679,65.0011226229539;50.2217053754004,67.3797722417004;53.8709064250330,69.7584218604466;59.1050339040620,73.1962497840096;46.5725043257680,65.0011226229541;50.1925891233372,67.3615936022486;53.8126739209065,69.7220645815437;58.6412945373398,72.8906219797227;63.4699151537731,76.0591793779017;67.0040233235138,78.3737562001848;53.8126739209065,69.7220645815430;60.5951452419737,66.7348185757824;67.3776165730143,63.7475725720017;66.7814350941405,72.2035451578994;66.1852536291473,80.6595177430841;68.9550084473222,83.2801724807890;65.6132120551451,70.3383882703140;71.6968924354930,70.8839157848206;77.7805728158411,71.4294432993272;80.3380877769445,75.2097661484614;82.8956027380479,78.9900889975958;87.8562431932838,84.8452951169874;77.7764870649695,71.4287047832497;84.6331543625164,77.1056374076606;91.4898216600633,82.7825700320715;94.7281021068762,84.6736120062330;97.9663825536890,86.5646539803949;98.5279806848532,93.5382074662974;91.4898216600633,82.7825700320715;95.2391600444175,82.8530103164797;98.9884984287718,82.9234506008865;97.6195706577929,91.4265261128835;96.2506428868137,99.9296016248765;99.9999812710007,100.000041909410];

solution2 = [5,5;2.51391672996304,8.81855575180137;0.0278334599260809,12.6371115036027;9.97035175042484,8.01135268835894;19.9128700409236,3.38559387311514;17.9882682853835,6.64314046762663;12.2712150767745,16.3745071108997;11.0827334622416,21.9737773799105;9.89425184759635,27.5730476536006;21.9068761355217,22.7074277392345;33.9195530053226,17.8418078338042;35.1822865973373,22.0265208033411;12.9134791266861,23.8469555836512;19.3044500446326,27.2354629565447;25.6954209684742,30.6239703210653;33.3365698269261,32.1796327178343;40.9777186926119,33.7352951138602;44.2811254496737,36.4422087307564;15.7474831816310,36.0545727345832;12.3091505487079,40.1423731362147;8.87081791677420,44.2301735389890;19.7171918306283,43.5625905296870;30.5635657412518,42.8950075205654;34.6990030829737,42.9519041863233;19.8334232930979,44.2889228678574;22.9308492522659,49.5312852932007;26.0282752114339,54.7736477185441;31.3604632792978,52.8710889672018;36.6926513471617,50.9685302158595;41.0201290851446,50.3478278807737;25.3497252475654,53.6026089993059;30.0649319068292,55.3748126652122;34.7801385660929,57.1470163311179;38.9227968100376,60.0307735421748;43.0654550539812,62.9145307532301;47.7265083727847,65.8638271517184;34.8128373755829,57.1887402697048;38.9275495022618,60.0079060768783;43.0422616289406,62.8270718840518;47.3440039846105,65.6009350684435;51.6457463402805,68.3747982528353;56.1283681736827,71.3240973957386;46.5725043257680,65.0011226229541;49.7153368302674,67.0489979484835;52.8581693347667,69.0968732740129;58.2385897577431,72.6271643714748;63.6190101807195,76.1574554689369;66.9399305248489,78.3322525496633;53.8126739209065,69.7220645815430;59.8794933412632,68.1071717406097;65.9463127616008,66.4922788976124;66.2544934760721,73.3173351209273;66.5626741900111,80.1423913418672;68.7200876243457,83.2102312468195;65.6132120551451,70.3383882703140;66.5504374250151,77.3695889355320;67.4876627941983,84.4007895981648;76.2399365549961,87.2117776613705;84.9922103176102,90.0227657214883;85.1519091764892,86.2124401394759;77.7764870649695,71.4287047832497;80.8093885392025,74.4811136586061;83.8422900134354,77.5335225339623;88.8757707748959,80.3378440981866;93.9092515363562,83.1421656624108;96.6683659640238,86.5125824565379;91.4898216600633,82.7825700320715;95.2241791794649,83.1247306927379;98.9585366988666,83.4668913534046;100.979872426304,90.6092699847014;103.001208153742,97.7516486159982;99.9999861972311,100.000018418263];

solution3 = [5,5;7.01899565723838,8.42387074338761;9.03799131447676,11.8477414867750;12.8127552647960,16.5648515482481;16.5875192151151,21.2819616097210;22.1448703760172,26.0230234911514;12.2712067281818,16.3745071109238;12.5923429274339,20.1107313472875;12.9134791266861,23.8469555836515;14.3304848883786,29.9507634335927;15.7474906500707,36.0545712835341;17.4436947829146,39.4313508722548;12.9134791266861,23.8469555836512;14.3304811541586,29.9507641591172;15.7474831816310,36.0545727345832;17.4436960167032,39.4313493906376;19.1399088517754,42.8081260466920;23.1457794656002,47.6222686912157;15.7474831816310,36.0545727345832;17.7904532373645,40.1717478012203;19.8334232930981,44.2889228678573;22.5894131684741,48.9424438487363;25.3454030438503,53.5959648296150;30.3419679356848,55.7005466153792;19.8334232930979,44.2889228678574;22.6790868428549,49.0841037505558;25.5247503926119,53.8792846332544;26.2575201397638,60.2240503364845;26.9902898869157,66.5688160397150;31.9536055054528,67.5135254704701;25.3497252475654,53.6026089993059;26.4255565063402,60.4982363449078;27.5013877651151,67.3938636905097;31.7061389541398,68.2360960616883;35.9108901431646,69.0783284328671;42.7413892489775,72.9473992088698;34.8128373755829,57.1887402697048;38.9275495022618,60.0079060768783;43.0422616289406,62.8270718840518;39.8209380173165,68.9582803238447;36.5996144056925,75.0894887636375;38.1703430914236,78.4946776564629;46.5721803275980,64.9973105449346;47.6820859263237,68.6099404375540;48.7920154448969,72.2225703298276;49.7180579525208,78.4350810046142;50.6440751597428,84.6475916805715;53.2000372263240,87.4682177313886;53.8193472447840,69.7002123913041;57.2395640677745,72.6741219546245;60.6597808902832,75.6493902730390;58.8858305813147,80.9395724313893;57.1197984313581,86.2248761543277;66.9560692350692,88.1242844829286;65.5972621080781,70.3383882703140;66.6386325895594,76.3024136974518;67.6800030708190,82.2664391245156;66.9946828817131,86.2500256116905;66.3093626925157,90.2336120909532;72.6115887923437,93.7491853535364;77.7764870649695,71.4287047832497;80.5895818277547,75.3273885044044;83.4026765905398,79.2260722255591;83.7483556258949,84.6750431902347;84.0940346612502,90.1240141549102;86.7217218930292,94.1037336685624;91.4898216600633,82.7825700320715;95.2391606780947,82.8529755180266;98.9884996961261,82.9233810039815;97.6195904196393,91.4264778579419;96.2506811431523,99.9295747119021;100.000020161168,99.9999801978649];

solution4 = [5,5;9.06552891455058,3.29853440727062;13.1310578291012,1.59706881453844;19.9366745532575,0.731374625301922;26.7422912774138,-0.134319563934529;29.5005757547475,2.40622501197694;12.2712067281818,16.3745071109238;14.2369192126089,5.69974307776453;16.2026316970360,-4.97502095539475;24.3839284329280,-1.11250808809225;32.5652251688184,2.75000477920389;35.3850146893635,5.22210664389497;12.8393362030390,23.8676333989745;21.0390245850595,22.4857760939729;29.2387129646722,21.1039187909762;32.0733856490115,15.7581531440185;34.9080583427148,10.4123874958132;40.9832527254282,12.4058393335605;15.7474831816310,36.0545727345832;21.1934390219088,26.8975391314482;26.6393948623199,17.7405055257423;33.2934868835060,21.7130683034385;39.9475789047220,25.6856310820588;45.0547015495984,30.9741293283526;20.1332332655541,44.8159062187158;31.9677824520919,40.8781429087379;43.7967972420767,36.8317404020925;45.3356383550753,40.2815846893996;46.8744794643415,43.7314289755647;51.5513068135250,48.0499603174518;25.3497252475654,52.2199931237230;31.5785804725735,42.8543681233733;37.8074356970424,33.4887431228856;39.7732468346649,30.2888478929087;41.7390579708982,27.0889526630048;48.6299754007441,38.7625172669404;34.8128373755829,57.1887402697048;38.7311024872399,52.1368463703253;42.6493675988968,47.0849524709457;50.1057850840799,50.6730662993003;57.5622025692628,54.2611801276549;59.8733863636295,57.2143021146115;46.5725043257680,65.0011226229541;47.3996672506461,56.9637579087817;48.2268301755243,48.9263931946090;56.0778259003886,53.6069828110442;63.9288216252532,58.2875724274783;66.0615029064516,61.4338678412677;53.8126739209065,69.7220645815430;59.7129429880258,70.0302264259285;65.6132120551463,70.3383882703176;71.9010762689198,70.9257350353890;78.1889404826980,71.5130818004602;80.3189675776775,75.5004612404389;65.6132120551451,70.3383882703140;71.6948495600573,70.8835465267818;77.7764870649695,71.4287047832497;80.3381988537765,75.2068265472109;82.8999106425834,78.9849483111721;87.8587463711548,84.8435374794827;77.7764870649695,71.4287047832497;80.8093886301214,74.4811134972463;83.8422901952733,77.5335222112431;88.8757706491429,80.3378442916010;93.9092511030126,83.1421663719591;96.6683661590778,86.5125824079673;91.4898216600633,82.7825700320715;95.2241806862138,83.1247142472021;98.9585397123643,83.4668584623324;100.979885867589,90.6092406328766;103.001232022815,97.7516228034206;100.000005659037,99.9999867231501];

solution5 = [5,5;8.63560336409089,10.6872535554619;12.2712067281819,16.3745071109238;14.9376994052548,19.0112317481004;17.6041920823278,21.6479563852765;22.1589778661064,25.9284763649207;12.2712067281818,16.3745071109238;8.79167054319052,19.8269096801826;5.31213435819924,23.2793122494414;3.13370618950904,28.0076621108990;0.955278020818839,32.7360119723566;-0.324257927327628,37.3790992039581;12.9134791266861,23.8469555836512;6.16022924258634,29.2167602670396;-0.593020641513468,34.5865649504279;-0.460060402062331,38.6966468186604;-0.327100162611192,42.8067286868928;6.16985103631646,45.4304919978264;15.7474831816310,36.0545727345832;12.1015614659167,39.4737320246192;8.45563975020240,42.8928913146552;4.30469421662520,47.2651965508130;0.153748683047955,51.6375017869708;5.61218110550369,55.6128535668573;19.8334232930979,44.2889228678574;13.8817125813096,48.3604243835238;7.93000186952131,52.4319258991901;15.4730681461343,61.2596311986975;23.0161344227474,70.0873364982049;19.7941384862678,68.1679494159622;25.2699620691012,53.2138844364279;16.4533019341560,53.3257224345185;7.63664179495741,53.4375604314316;11.0771464911152,58.2357603770892;14.5176511901795,63.0339603209271;19.5183253519171,64.4597051645226;34.8128373755829,57.1887402697048;20.4141633698926,63.5921632003916;6.01548935983524,69.9955861307465;10.7820545128743,71.6571348421172;15.5486196673102,73.3186835542026;16.7256849028856,79.2629560274577;46.5725043257680,65.0011226229541;41.6245340801575,71.3106043774423;36.6765638345470,77.6200861319308;38.7318632812974,81.9868964199477;40.7871627280478,86.3537067079649;47.1883184677668,86.0115391395939;53.8126739209065,69.7220645815430;44.1436155952020,72.4999845282112;34.4745572694975,75.2779044748793;38.0499834519314,81.2121251394952;41.6254096343654,87.1463458041114;46.7283218141151,86.1714078213556;65.6132120551451,70.3383882703140;61.1795747286369,77.3612337374433;56.7459374002480,84.3840792047508;53.0619546775635,83.6349061001005;49.3779719540463,82.8857329928699;44.4310524181566,87.8380360820003;68.2748300616527,71.4287047832497;67.3347064188894,80.2419227272075;66.3945827761443,89.0551406740835;67.4288167021846,93.1751838835522;68.4630506303910,97.2952270960614;62.6729516963355,101.305937017084;91.4898216600633,82.7825700320715;83.3787598583136,85.3986968702161;75.2676980564527,88.0148237081874;73.1767115591544,91.9511083539795;71.0857250605713,95.8873929998155;77.5882368794811,99.7780120076939];

Path_bez = [0,0;0.986356033640909,1.00687253555462;1.94542413456364,2.02749014221848;2.87720430276818,3.06185281999157;3.78169653825454,4.10996056887391;4.65890084102272,5.17181338886548;5.50881721107272,6.24741127996629;6.33144564840454,7.33675424217634;7.12678615301817,8.43984227549562;7.89483872491362,9.55667537992415;8.63560336409089,10.6872535554619;8.63560336409089,10.6872535554619;9.32957936526068,11.8051939733633;9.95726602313370,12.8841138048827;10.5186633377099,13.9240130500202;11.0137713089894,14.9248917087757;11.4425899369721,15.8867497811493;11.8051192216580,16.8095872671409;12.1013591630472,17.6934041667505;12.3313097611395,18.5382004799781;12.4949710159351,19.3439762068238;12.5923429274339,20.1107313472875;12.5923429274339,20.1107313472875;12.6675288255666,20.8816520379513;12.7646320402636,21.6999244153971;12.8836525715251,22.5655484796250;13.0245904193509,23.4785242306349;13.1874455837412,24.4388516684268;13.3722180646958,25.4465307930008;13.5789078622149,26.5015616043568;13.8075149762984,27.6039441024949;14.0580394069463,28.7536782874151;14.3304811541586,29.9507641591172;14.3304811541586,29.9507641591172;14.6201412399357,31.1516595391221;14.9223206862780,32.3128222489505;15.2370194931855,33.4342522886022;15.5642376606583,34.5159496580774;15.9039751886963,35.5579143573760;16.2562320772995,36.5601463864980;16.6210083264679,37.5226457454435;16.9983039362015,38.4454124342123;17.3881189065004,39.3284464528046;17.7904532373645,40.1717478012203;17.7904532373645,40.1717478012203;18.2061990577262,41.0005794945386;18.6362484965179,41.8402045478386;19.0806015537396,42.6906229611204;19.5392582293913,43.5518347343839;20.0122185234730,44.4238398676292;20.4994824359847,45.3066383608562;21.0010499669264,46.2002302140649;21.5169211162982,47.1046154272554;22.0470958840999,48.0197940004277;22.5915742703316,48.9457659335816;22.5915742703316,48.9457659335816;23.1629385166461,49.8484967724212;23.7737708646961,50.6939520626504;24.4240713144816,51.4821318042690;25.1138398660026,52.2130359972771;25.8430765192591,52.8866646416747;26.6117812742511,53.5030177374618;27.4199541309786,54.0620952846384;28.2675950894416,54.5638972832046;29.1547041496401,55.0084237331602;30.0812813115742,55.3956746345054;30.0812813115742,55.3956746345054;31.0390752984868,55.7754190169595;32.0198348336210,56.1974259102421;33.0235599169770,56.6616953143533;34.0502505485546,57.1682272292930;35.0999067283539,57.7170216550611;36.1725284563749,58.3080785916578;37.2681157326175,58.9413980390829;38.3866685570818,59.6169799973366;39.5281869297678,60.3348244664188;40.6926708506755,61.0949314463295;40.6926708506755,61.0949314463295;41.8460400589187,61.8607124796811;42.9542142936115,62.5955791090861;44.0171935547539,63.2995313345445;45.0349778423457,63.9725691560563;46.0075671563872,64.6146925736215;46.9349614968781,65.2259015872401;47.8171608638186,65.8061961969121;48.6541652572086,66.3555764026376;49.4459746770482,66.8740422044164;50.1925891233372,67.3615936022486;50.1925891233372,67.3615936022486;50.9394079255466,67.8131647067584;51.7318304131470,68.2236896285700;52.5698565861383,68.5931683676834;53.4534864445207,68.9216009240987;54.3827199882940,69.2089872978158;55.3575572174584,69.4553274888347;56.3779981320137,69.6606214971554;57.4440427319601,69.8248693227780;58.5556910172974,69.9480709657023;59.7129429880258,70.0302264259285;59.7129429880258,70.0302264259285;60.8948104858276,70.0942287589264;62.0803053523852,70.1629710201660;63.2694275876987,70.2364532096472;64.4621771917681,70.3146753273701;65.6585541645933,70.3976373733346;66.8585585061744,70.4853393475407;68.0621902165113,70.5777812499885;69.2694492956041,70.6749630806780;70.4803357434528,70.7768848396091;71.6948495600573,70.8835465267818;71.6948495600573,70.8835465267818;72.9189273589661,71.0438959217548;74.1585057537276,71.3068808040867;75.4135847443417,71.6725011737774;76.6841643308086,72.1407570308270;77.9702445131282,72.7116483752354;79.2718252913004,73.3851752070028;80.5889066653254,74.1613375261289;81.9214886352031,75.0401353326139;83.2695712009334,76.0215686264578;84.6331543625164,77.1056374076606;84.6331543625164,77.1056374076606;85.9687936697071,78.2023003089912;87.2330446722605,79.2215159632188;88.4259073701765,80.1632843703432;89.5473817634552,81.0276055303645;90.5974678520965,81.8144794432828;91.5761656361005,82.5239061090980;92.4834751154672,83.1558855278101;93.3193962901965,83.7104176994191;94.0839291602885,84.1875026239250;94.7770737257431,84.5871403013278;94.7770737257431,84.5871403013278;95.4047397886442,84.9804964175179;95.9728371510755,85.4387366583860;96.4813658130371,85.9618610239318;96.9303257745289,86.5498695141555;97.3197170355508,87.2027621290570;97.6495395961031,87.9205388686364;97.9197934561856,88.7031997328935;98.1304786157983,89.5507447218286;98.2815950749412,90.4631738354414;98.3731428336144,91.4404870737321;98.3731428336144,91.4404870737321;98.4449984728727,92.4348619735615;98.5370385737711,93.3984760717902;98.6492631363095,94.3313293684184;98.7816721604879,95.2334218634461;98.9342656463065,96.1047535568731;99.1070435937651,96.9453244486996;99.3000060028637,97.7551345389256;99.5131528736024,98.5341838275510;99.7464842059812,99.2824723145758;100,100];

ms_i = 5;
uav_ws = 1.0;
%Make youtube video

%For static obstacle field, need:
%position, size of static obstacles

rng(5);
n_obs = 52; %number of static obstacles
obs = rand(n_obs,2)*90+5; %obstacle locations
rng(4); %for partially random obstacle size
obs_rad = 4 +  rand(n_obs,1)*3; %obstacle radius

end